package com.example.controller;


import com.example.common.result.Result;
import com.example.entity.vo.MoctaQueryVo;
import com.example.entity.vo.SfcteQueryVo;
import com.example.service.MoctaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LiangPandeng
 * @since 2024-02-28
 */
@RestController
@RequestMapping("/api/mocta")
@Api(tags = "工单前端控制器")
@Slf4j
public class MoctaController {

    @Resource
    private MoctaService moctaService;

    @ApiOperation("工单情况分页查询")
    @PostMapping("/queryMoctaQueryVo/{current}/{size}")
    public Result<Map<String, MoctaQueryVo>> queryMoctaQueryVo(@PathVariable Integer current, @PathVariable Integer size,@RequestBody MoctaQueryVo moctaQueryVo){
        return this.moctaService.queryMoctaQueryVo(current,size,moctaQueryVo);
    }

    @ApiOperation("派工单查询")
    @PostMapping("/querySfcte/{current}/{size}")
    public Result<Map<String,SfcteQueryVo>> querySfcte(@PathVariable Integer current, @PathVariable Integer size, @RequestBody SfcteQueryVo sfcteQueryVo){
        return this.moctaService.querySfcte(current,size,sfcteQueryVo);
    }
}
